{/include file="simpla/common/header.html"/}
{/include file="simpla/common/left.html"/}
<div id="main-content">
  <h2>欢迎您 {/$_adminname/}</h2>
  <p id="page-intro">查看商品的出库明细。</p>
  <div class="clear"></div>
  <div class="content-box">
    <div class="content-box-header">
      <h3>销售明细</h3>
      <ul class="content-box-tabs">
        <li><a href="#tab1" class="default-tab">退货单管理</a></li>
        <li><a href="{/get_url rule="/stockback/stockback"/}">商品退货</a></li>
     <!--   <li><a href="{/get_url rule="/stockout/stockback"/}">商品退货</a></li>-->
      </ul>
      <div class="clear"></div>
    </div>
    <div class="content-box-content">
      <div class="tab-content default-tab" id="tab1">
        <div class="form">
          <form action="{/get_url rule='/stockback/index'/}" method="post" id="js-form">
            <fieldset class="clearfix">
				<p>
					客户姓名：<span><input type="text" name="key_cname" value="{/$key.customer_name/}" class="text-input small-input" /></span>
				</p>
				<p>
					退货单编号：<span><input type="text" name="key_ssn" value="{/$key.stockback_sn/}" class="text-input small-input" /></span>
					&nbsp;&nbsp;商品编号：<span><input type="text" name="key_gsn" value="{/$key.goods_sn/}" class="text-input small-input" /></span>
					</p>
				<p>
					商品名称：<span><input type="text" name="key_name" value="{/$key.goods_name/}" class="text-input medium-input" /></span>
				</p>
				<p>日期范围：<input type="text" name="date_start" id="date_start_picker" class="text-input min-input" value="{/$key.date_start/}"/>&nbsp;--&nbsp;<input type="text" name="date_end" id="date_end_picker" class="text-input min-input" value="{/$key.date_end/}"/>（格式1900-01-01）&nbsp;&nbsp;<input type="submit" name="filter" id="button" class="button" value="查询" />&nbsp;&nbsp;<input type="submit" name="export" id="button" class="button" value="导出" />
				</p>
            </fieldset>
          </form>
        </div>
        <hr />
        <table class="centertable">
          <thead>
            <tr>
              <th>退货单号</th>
              <th>客户姓名</th>
              <!--th>商品概要</th-->
              <th>总金额</th>
              <th>日期时间</th>
			  <th>管理</th>
            </tr>
          </thead>
          <tfoot>
            <tr>
              <td colspan="5">{/$pagebar/}</td>
            </tr>
          </tfoot>
          <tbody>
          {/section name=i loop=$stockback/}
          <tr>
			  <td><a href="{/get_url rule='/stockback/stockback' data='ac=print&sid='|cat:$stockback[i].stockback_sn/}" title="打印" target="_blank">{/$stockback[i].stockback_sn/}</a></td>
            <td>{/$stockback[i].customer_name/}</td>
            <!--td>{/$stockout[i].goods_brief/}</td-->
			<td>{/$stockback[i].stockback_totalprice/}</td>
			<td>{/$stockback[i].stockback_opttime/}</td>
			<td>
				<!--a href="{/get_url rule='/stockout/index' data='ac=detail&sid='|cat:$stockout[i].stockout_sn/}" title="详细"><img src="{/$root_dir/}/assets/simpla/images/icons/content.png" alt="详细" /></a-->
				<a href="{/get_url rule='/stockback/stockback' data='ac=print&sid='|cat:$stockback[i].stockback_sn/}" title="打印" target="_blank"><img src="{/$root_dir/}/assets/simpla/images/icons/printer.png" alt="打印" /></a>
				<!--a href="{/get_url rule='/stockout/stockout' data='ac=mod&sid='|cat:$stockout[i].stockout_sn/}" title="编辑"><img src="{/$root_dir/}/assets/simpla/images/icons/hammer_screwdriver.png" alt="编辑" /></a-->
				<a onclick="return(confirm('确认要删除此退货单?'))" href="{/get_url rule='/stockback/index' data='ac=del&sid='|cat:$stockback[i].stockback_sn/}" title="删除"><img src="{/$root_dir/}/assets/simpla/images/icons/cross.png" alt="删除" /></a>
			</td>
          </tr>
          {/sectionelse/}
          <tr>
            <td colspan="5" align="center">没有数据</td>
          </tr>
          {//section/}
            </tbody>
        </table>
      </div>
    </div>
  </div>
  {/include file="simpla/common/copy.html"/} </div>
{/include file="simpla/common/footer.html"/} 
<script type="text/javascript">
	$(function(){
		$("#date_start_picker").datepicker();
		$("#date_end_picker").datepicker();
	});
</script>